package itheima;

/**
 * 日标：了解Math工具类API提供常用功能方法
 */
public class MathTest {
    public static void main(String[] args) {
        System.out.println("打武器宝石，成功的概率： "+ java.lang.Math.random()+"%");
        System.out.println("最大值："+ Math.max(10,20));
        System.out.println("最小值："+ Math.min(10,20));
        System.out.println("绝对值："+ Math.abs(-10));
        System.out.println("向上取整："+ Math.ceil(10.1));
        System.out.println("向下取整："+ Math.floor(10.1));
        System.out.println("四舍五入："+ Math.round(10.1));
        System.out.println("平方根："+ Math.sqrt(9));
        System.out.println("立方根："+ Math.cbrt(27));
        System.out.println("e的次方："+ Math.exp(2));
        System.out.println("2的次方："+ Math.pow(2,3));
        System.out.println("自然对数："+ Math.log(2));
        System.out.println("正弦值："+ Math.sin(2));
        System.out.println("余弦值："+ Math.cos(2));
        System.out.println("正切值："+ Math.tan(2));
        System.out.println("反正弦值："+ Math.asin(2));
        System.out.println("反余弦值："+ Math.acos(2));
        System.out.println("反正切值："+ Math.atan(2));


    }
}
